<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Tastatur</title>
</head>

<body bgcolor="FFFFFF">

<h1><img align="center" height="32" width="32" src="../../../icons/keyboard.gif">
<em>Tastatur</em></h1>

<p><table>
<tr><td><strong>Bibliothek:</strong></td>
	<td><a href="index.html">Input/Output</a></td></tr>
<tr><td><strong>Eingeführt:</strong></td>
	<td>2.2.0</td></tr>
<tr><td valign="top"><strong>Aussehen:</strong></td>
	<td valign="top"><img src="../../../img-libs/keyboard.png"></td></tr>
</table></p>

<h2>Verhalten</h2>

<p>This component allows the circuit to read keys typed from the keyboard -
as long as the keys are representable in the 7-bit ASCII code.
After clicking the component using the poke tool, the user can type characters,
which accumulate in a buffer. At all times, the ASCII value for the leftmost
character in the buffer is sent out the rightmost output. When the clock input
is triggered, the leftmost character disappears from the buffer and the new
leftmost character is sent on the rightmost output.</p>

<p>The supported characters for the buffer include all the printable ASCII
characters, as well as space, newline, backspace, and control-L. In addition,
the left-arrow and right-arrow keys move the cursor within the buffer, and the
delete key deletes the character to the right of the cursor (if any).</p> 

<p>The component is asynchronous in the sense that when the buffer is empty and
the user types a character, that character is sent immediately as an output,
without any wait for a clock pulse.</p>

<h2>Pins</h2>

<dl>

<dt>West edge, marked by a triangle (input, bit width 1)</dt>
<dd>Clock - when triggered while the read-enable pin isn't 0, the leftmost
character from the buffer is deleted,
and the outputs are updated to reflect the buffer's new status.</dd> 

<dt>South edge, leftmost pin (input, bit width 1)</dt>
<dd>Read Enable - when 1 (or floating or error), a clock edge will consume
the leftmost character from the buffer. The clock input is ignored when
Read Enable is 0.</dd>

<dt>South edge, second pin from left (input, bit width 1)</dt>
<dd>Clear - when 1, the buffer is emptied and does not accept further
characters.</dd>

<dt>South edge, second pin from right (output, bit width 1)</dt>
<dd>Available - this is 1 when the buffer contains at least one character
and 0 when the buffer is empty.</dd>

<dt>South edge, rightmost pin (output, bit width 7)</dt>
<dd>Data - the 7-bit ASCII code for the leftmost character in the buffer,
or 0 if the buffer is empty.</dd>

</dl>

<h2>Attribute</h2>

<dl>

<dt>Buffer Length</dt>
<dd>The number of characters that the buffer can hold at once.</dd>

<dt>Trigger</dt>
<dd>If the value is <q>Rising Edge,</q> then when the clock input changes
from 0 to 1, the leftmost character is consumed (when enabled by the Read
Enable input). If it is <q>Falling Edge,</q>, then this happens when the
clock input changes from 1 to 0.</dd>

</dl>

<h2>Verhalten des Schaltwerkzeugs</h2>

<p>Pressing the mouse button into the component gives keyboard focus to the
component, and a vertical-bar cursor will be displayed.</p>

<p>Each character typed will then be inserted into the buffer, as long as the
buffer hasn't reached its capacity and the character is one of those that the
component supports: the printable characters within the 7-bit ASCII code, as
well as space, backspace, newline, and control-L. Additionally, the user may
type the left-arrow and right-arrow keys to change the location of the cursor
within the buffer, and the user may type the delete key to delete the buffer
character (if any) just to the right of the cursor.</p>

<h2>Verhalten des Textwerkzeugs</h2>

<p>Keines.</p>

<p><a href="../index.html">Zurück zur <em>Bibliotheksreferenz</em></a></p>

</body>
</html>
